package cn.hongyu.service.impl;

import cn.hongyu.dao.RoleDao;
import cn.hongyu.pojo.Role;
import cn.hongyu.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {

    @Autowired
    private RoleDao roleDao;

    @Override
    public List<Role> list() {
        List<Role> list=roleDao.list();
        return list;
    }

    @Override
    public void save(Role role) {
        roleDao.save(role);
    }

    @Override
    public void delete(Long id) {
        roleDao.delete(id);
        System.out.println("删除成功!");
    }
}
